package com.demo.mvc.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;

/**
 * @author luogq
 */
@Aspect
@Component
@Slf4j
public class Aop001 {

  @Around(value = "execution(* com.demo.mvc.controller.Test01.apiBaz(..))")
  public Object cutPoint(ProceedingJoinPoint pj) throws Throwable {
    log.info("Test01.apiBaz Around, param :  {}", pj.getArgs()[0]);
    return pj.proceed();
  }
}
